﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CF_DAL_WS.Models;

namespace CF_DAL_WS.DTO
{
    public class RoleDTO
    {
        public Guid ID { get; set; }
        public string Name { get; set; }

        public static RoleDTO Translate(aspnet_Roles Entity)
        {
            if (Entity != null)
            {
                var dto = new RoleDTO
                {
                    ID = Entity.RoleId,
                    Name = Entity.RoleName
                };
                return dto;
            }
            return null;
        }

        public override string ToString()
        {
            return Name;
        }
    }
}